<template>
  <div class="Index">
    <div class="text">73%</div>
    <div class="contrast">
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <div class="circle"></div>
      <div class="button"></div>
    </div>
  </div>
</template>

<script setup lang="ts"></script>

<style lang="less">
.Index {
  width: 100%;
  height: 100%;
  background: #000;
  position: relative;

  .text {
    width: 200px;
    height: 200px;
    text-align: center;
    z-index: 9;
    font-size: 30px;
    line-height: 200px;
    color: white;
    position: absolute;
    left: 50%;
    top: 10%;
    transform: translate(-50%, 0%);
  }

  .contrast {
    width: 100%;
    height: 100%;
    background-color: #000;
    overflow: hidden;
    filter: contrast(15) hue-rotate(0);
    position: relative;
    animation: hueRotate 6s linear infinite;

    span {
      background: #00ff6f;
      position: absolute;
      bottom: 0;
      border-radius: 100px 100px 0 0;
      filter: blur(5px);
      animation: moveUp ease-in-out infinite;

      &:nth-child(1) {
        width: 20px;
        height: 20px;
        left: 50%;
        animation-duration: 4s;
        animation-delay: 2s;
      }

      &:nth-child(2) {
        width: 22px;
        height: 22px;
        left: 54%;
        animation-duration: 4.2s;
        animation-delay: 4s;
      }

      &:nth-child(3) {
        width: 24px;
        height: 24px;
        left: 45%;
        animation-duration: 3s;
        animation-delay: 1s;
      }

      &:nth-child(4) {
        width: 20px;
        height: 22px;
        left: 54%;
        animation-duration: 5s;
        animation-delay: 0s;
      }

      &:nth-child(5) {
        width: 22px;
        height: 22px;
        left: 52%;
        animation-duration: 3.5s;
        animation-delay: 5s;
      }

      &:nth-child(6) {
        width: 20px;
        height: 20px;
        left: 50%;
        animation-duration: 4.7s;
        animation-delay: 1.2s;
      }

      &:nth-child(7) {
        width: 22px;
        height: 22px;
        left: 54%;
        animation-duration: 2.5s;
        animation-delay: 3.5s;
      }

      &:nth-child(8) {
        width: 24px;
        height: 24px;
        left: 51%;
        animation-duration: 5.6s;
        animation-delay: 4.2s;
      }

      &:nth-child(9) {
        width: 26px;
        height: 26px;
        left: 42%;
        animation-duration: 5.2s;
        animation-delay: 4s;
      }

      &:nth-child(10) {
        width: 26px;
        height: 22px;
        left: 54%;
        animation-duration: 3.8s;
        animation-delay: 4.3s;
      }

      &:nth-child(11) {
        width: 22px;
        height: 22px;
        left: 42%;
        animation-duration: 4.2s;
        animation-delay: 0.3s;
      }

      &:nth-child(12) {
        width: 24px;
        height: 24px;
        left: 46%;
        animation-duration: 4.6s;
        animation-delay: 2s;
      }

      &:nth-child(13) {
        width: 22px;
        height: 22px;
        left: 48%;
        animation-duration: 3.8s;
        animation-delay: 3.2s;
      }

      &:nth-child(14) {
        width: 26px;
        height: 22px;
        left: 55%;
        animation-duration: 5.2s;
        animation-delay: 2.9s;
      }

      &:nth-child(15) {
        width: 26px;
        height: 22px;
        left: 52%;
        animation-duration: 4.9s;
        animation-delay: 4.2s;
      }
    }

    .button {
      width: 150px;
      height: 50px;
      background: #00ff6f;
      position: absolute;
      left: 50%;
      bottom: 0;
      transform: translate(-50%, 0);
      border-radius: 100px 100px 0 0;
      filter: blur(5px);
    }
  }

  .circle {
    width: 300px;
    height: 300px;
    position: absolute;
    top: 10px;
    left: 50%;
    margin-left: -150px;
    box-sizing: border-box;
    filter: blur(8px);
    animation: circleRotate 6s linear infinite;

    &::before {
      content: "";
      height: 200px;
      width: 200px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) rotate(0);
      background: #00ff6f;
      //   border-radius: 42% 38% 62% 49% / 45%;
      animation: borderRadiusChange 6s linear infinite;
    }

    &::after {
      content: "";
      width: 176px;
      height: 178px;
      background: #000;
      border-radius: 50%;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
}

@keyframes hueRotate {
  0% {
    filter: contrast(15) hue-rotate(0);
  }

  100% {
    filter: contrast(15) hue-rotate(360deg);
  }
}

@keyframes circleRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes moveUp {
  0% {
    bottom: 0;
  }

  100% {
    bottom: calc(100% - 265px);
  }
}

@keyframes borderRadiusChange {
  0% {
    border-radius: 42% 38% 62% 49% / 45%;
  }
  50% {
    border-radius: 56% 50% 44% 68% / 65%;
  }
  100% {
    border-radius: 42% 38% 62% 49% / 45%;
  }
}
</style>
